package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.AirportDto;
import xyz.zhouzhaodong.crm.service.IAirportService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 接机 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-19
 */
@RestController
@RequestMapping("/airport")
public class AirportController {

    @Resource
    IAirportService airportService;

    /**
     * 新增接机信息
     * @param airportDto
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addAirport(AirportDto airportDto){
        return airportService.addAirport(airportDto);
    }

    /**
     * 删除接机信息
     * @param airportDto
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteAirport(AirportDto airportDto){
        return airportService.deleteAirport(airportDto);
    }

    /**
     * 修改接机信息
     * @param airportDto
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateAirport(AirportDto airportDto){
        return airportService.updateAirport(airportDto);
    }

    /**
     * 查询接机信息
     * @param airportDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectAirport(AirportDto airportDto){
        return airportService.selectAirport(airportDto);
    }

    /**
     * 根据用户id查询接机信息
     * @param airportDto
     * @return
     */
    @RequestMapping("/selectList")
    public RestMessage selectAirportList(AirportDto airportDto){
        return airportService.selectAirportList(airportDto);
    }

}
